/*
编写 : Hexh
时间 : 2012-7-9 10:48:32
*/
using System;
using System.Collections.Generic;
using FsCarInfo.Core.Entity;
using FsCarInfo.Core.Entity.IRespositories;
using HMIS.FrameWork;
using HMIS.FrameWork.DomainBase;

namespace FsCarInfo.Facade.Impl
{
	/// <summary>
	///	 the impl of IFsGatelogListFacade
	/// </summary>
	public class FsGatelogListFacadeImpl : IFsGatelogListFacade
	{

		private readonly IFsGatelogListRepository FsGatelogListRepository;

		public FsGatelogListFacadeImpl(IFsGatelogListRepository FsGatelogListRepository)
        {
			this.FsGatelogListRepository = FsGatelogListRepository;
        }

        #region IFsGatelogList Entity Save,Get,Update,Delete

		public FsGatelogList Get(string id)
		{
			return FsGatelogListRepository.Get(id);
		}

		public FsGatelogList Load(string id)
		{
			return FsGatelogListRepository.Load(id);
		}

		public void SaveLog(FsGatelogList entity)
		{
			this.FsGatelogListRepository.SaveLog(entity);
		}

		public void SaveOrUpdate(FsGatelogList entity)
		{
			this.FsGatelogListRepository.SaveOrUpdate(entity);
		}

		public void Delete(string id)
		{
			FsGatelogListRepository.Delete(id);
		}
		
		public void PhysicsDelete(string id)
		{
			FsGatelogListRepository.PhysicsDelete(id);
		}

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
		{
			return FsGatelogListRepository.IsFieldExist(fieldName, fieldValue, id);
		}
		
		public bool IsFieldExistWhere(string fieldName, string fieldValue, string id, string where)
		{
			return FsGatelogListRepository.IsFieldExistWhere(fieldName, fieldValue, id, where);
		}
		
		#endregion
		
		#region Query 

		public IList<FsGatelogList> GetAll()
		{
			return FsGatelogListRepository.GetAll();
		}

		public IList<FsGatelogList> GetPlist(string DepartmentId, string GateId, string CardUid,
			string ApprState, string State, int start, int limit,
			string sort, string dir, List<DataFilter> filters, out long total)
		{
			return FsGatelogListRepository.GetPlist(DepartmentId, GateId, CardUid, ApprState, State, start, limit, sort, dir, filters, out total);
		}

		public IList<FsGatelogList> GetPlistAll(string query, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return FsGatelogListRepository.GetPlistAll(query, start, limit, sort, dir, filters, out total);
		}
		
		#endregion
	}
}
